﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Xml;
using System.IO;

using MonoDevelop.Projects;

namespace Coq.MonoDevelop
{
    public class CoqProjectBinding : IProjectBinding
    {
        static readonly string m_Name = "Coq";
        static readonly string m_Language = "Coq";

        public CoqProjectBinding()
        {
        }

        public string Name
        {
            get
            {
                return m_Name;
            }
        }

        public Project CreateProject(ProjectCreateInformation info,
                                      XmlElement projectOptions)
        {
            //return new PythonProject(m_Language, null, projectOptions);
            return new CoqProject();
        }

        public Project CreateSingleFileProject(string sourceFile)
        {
            //ProjectCreateInformation info = new ProjectCreateInformation();
            //info.ProjectName = Path.GetFileNameWithoutExtension(sourceFile);
            //info.SolutionPath = Path.GetDirectoryName(sourceFile);
            //info.ProjectBasePath = Path.GetDirectoryName(sourceFile);

            //PythonProject project = new PythonProject(m_Language, info, null);
            //project.Files.Add(new ProjectFile(sourceFile));
            return new CoqProject();//project;
        }

        public bool CanCreateSingleFileProject(string sourceFile)
        {
            return Path.GetExtension(sourceFile) == ".v";
        }
    }
}
